<%@include file="header.jsp"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<div id="page-wrapper">
	<div class="row">
		<div class="col-lg-12">
			<h1 class="page-header">Thông tin văn phòng phẩm</h1>
		</div>
		<!-- /.col-lg-12 -->
	</div>
	<c:url value="/stationery/saveorupdate" var="theAction"/>
	<form:form commandName="stationery" style="width: 50%;" action="${theAction}" method="POST">
	
		<label>Tên văn phòng phẩm</label>
		<div class="form-group input-group">
			<span class="input-group-addon">Required</span>
			<form:input class="form-control" type="text" placeholder="Ví dụ: Bút bi thiên long" path="stationeryName"></form:input>
		</div>
		
		<label>Giá </label>
		<div class="form-group input-group">
			<span class="input-group-addon">Required</span>
			<form:input class="form-control" placeholder="Ví dụ: 200000" type="text"
				path="stationeryPrice"></form:input>
			<span class="input-group-addon">.VND</span>
		</div>

		<label>Số lượng</label>
		<div class="form-group input-group">
			<span class="input-group-addon">Required</span>
			<form:input class="form-control" placeholder="Ví dụ: 10" type="text"
				path="stationeryQuantity"></form:input>
			
		</div>
		
		<label>Đơn vị tính</label>
		<div class="form-group input-group">
			<span class="input-group-addon">Required</span>
			<form:input class="form-control" placeholder="Ví dụ: Chiếc" type="text"
				path="stationeryUnit"></form:input>
		</div>
		
		<label>Loại</label>
		<div class="form-group input-group">
			<span class="input-group-addon">Required</span>
			<form:select path="type.typeId" class="form-control">
				<c:forEach items="${typeList}" var="emp">
				<form:option value="${emp.typeId}" id="${emp.typeId}">${emp.typeName}</form:option>
				</c:forEach>
			</form:select>
		</div>
		<form:input type="hidden" path="stationeryId"></form:input>
		<button type="submit" class="btn btn-warning">Lưu lại</button>
		<a href="<c:url value="/type"/>"> <span
			class="btn btn-info ">Quay lại danh sách </span>
		</a>
	</form:form>
</div>
<!-- /#page-wrapper -->
<!-- /#wrapper -->
<%@include file="footer.jsp"%>